require("../../../../@babel/runtime/helpers/Arrayincludes"), require("../../../../@babel/runtime/helpers/Objectvalues"), 
(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/home/components/novice-rights/index" ], {
    3508: function(e, t, n) {},
    "7d1b": function(e, t, n) {
        n.d(t, "b", function() {
            return i;
        }), n.d(t, "c", function() {
            return o;
        }), n.d(t, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    c58a: function(e, t, n) {
        var i = n("3508");
        n.n(i).a;
    },
    c5ee: function(e, t, n) {
        n.r(t);
        var i = n("7d1b"), o = n("d422");
        for (var r in o) [ "default" ].indexOf(r) < 0 && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(r);
        n("c58a");
        var a = n("f0c5"), u = Object(a.a)(o.default, i.b, i.c, !1, null, "04425b9a", null, !1, i.a, void 0);
        t.default = u.exports;
    },
    cc93: function(e, t, n) {
        (function(e) {
            var i = n("4ea4").default;
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = i(n("a34a")), r = i(n("448a")), a = i(n("c973")), u = i(n("ded3")), c = n("fd0e"), l = n("665c"), d = n("05dc"), s = n("48b8"), f = n("8f93"), v = n("b70e"), p = n("0490"), g = {};
            g.props = {
                isNewUserAddr: {
                    type: Boolean,
                    default: !1
                }
            }, g.setup = function(t, n) {
                var i = t, g = n.emit;
                (0, c.onBeforeMount)(function() {
                    g("loaded", {
                        getConfig: B
                    }), p.noviceRightLoaded.resolve();
                });
                var b = (0, l.useState)(), h = b.selectedService, _ = b.selectedHomeBigVehicle, m = b.userInfo, x = (0, 
                l.useGetters)(), y = x.startAddress, w = x.commonStatisticsState, k = x.isLogined, O = x.selectedVehicle, T = x.isRefrigeratedService, R = x.isMotorcycle, A = (0, 
                c.reactive)({
                    config: {}
                }), C = ((0, c.computed)(function() {
                    var e;
                    return !(null === (e = A.config) || void 0 === e || !e.isNewUser);
                }), (0, c.computed)(function() {
                    var e = ((A.config || {}).benefit || {}).background, t = "\n          background-image:url(".concat(void 0 === e ? "" : e, ");\n          background-size: cover;\n          border-style: solid;\n          border-color: #FFFFFF;\n          box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.04);\n          ");
                    return i.isNewUserAddr ? t += "border-width: 1px 0 0 1px;" : t += "border-width: 1px 1px 0 1px;", 
                    t;
                })), S = (0, c.computed)(function() {
                    var e, t, n;
                    return null !== (e = null === (t = A.config) || void 0 === t || null === (n = t.benefit) || void 0 === n ? void 0 : n.jumpUrl) && void 0 !== e ? e : "";
                }), E = (0, c.computed)(function() {
                    var e = A.config.benefitList, t = void 0 === e ? [] : e;
                    return Array.isArray(t) ? t.map(function(e) {
                        var t, n;
                        return (0, s.hightLightTxt)(null !== (t = null === (n = e.showTexts) || void 0 === n ? void 0 : n.head) && void 0 !== t ? t : "", "{}", "color: #FF3B30;");
                    }).join("，") : "";
                }), N = (0, c.computed)(function() {
                    var e, t, n = (null !== (e = null === (t = A.config) || void 0 === t ? void 0 : t.newerBenefitsAdsSetting) && void 0 !== e ? e : {}).newerBenefits, i = void 0 === n ? 0 : n;
                    return E.value || S.value || (i = 0), i;
                }), U = (0, c.computed)(function() {
                    var e;
                    return (null === (e = E.value) || void 0 === e ? void 0 : e.indexOf("仅剩 1 天")) >= 0;
                }), j = (0, s.throttle)(function() {
                    S.value && ((0, d.statistics)("homepage_rights_resource_click", (0, u.default)({}, I())), 
                    e.navigateTo({
                        url: "/pages/adWebview/index?targetUrl=".concat(encodeURIComponent(S.value))
                    }));
                });
                function B() {
                    return F.apply(this, arguments);
                }
                function F() {
                    return (F = (0, a.default)(o.default.mark(function e() {
                        var t, n, i, a, c, l, d, p, b, x, w, C, S, E, j, B, F;
                        return o.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                if (i = {}, k.value) {
                                    e.next = 3;
                                    break;
                                }
                                return e.abrupt("return");

                              case 3:
                                if (a = O.value, c = a.vehicle_attr, l = a.order_vehicle_id, d = _.value, p = d.order_vehicle_id, 
                                5 !== h.value || (0, s.isEmpty)(d) || p === O.value.order_vehicle_id || (l = p, 
                                c = d.vehicle_attr), l) {
                                    e.next = 9;
                                    break;
                                }
                                return e.abrupt("return");

                              case 9:
                                return b = {
                                    city_id: null === (t = y.value) || void 0 === t ? void 0 : t.city_id,
                                    order_vehicle_id: l,
                                    vehicle_attr: c,
                                    biz_type: R.value ? 2 : T.value ? 3 : 0
                                }, e.next = 12, (0, v.usePreload)("getNoviceRights", function() {
                                    return (0, f.getNoviceRights)(b);
                                }, [].concat((0, r.default)(Object.values(b)), [ null === (n = m.value) || void 0 === n ? void 0 : n.token ])).catch(function(e) {
                                    console.error(e);
                                });

                              case 12:
                                x = e.sent, 0 === Number(null == x ? void 0 : x.ret) && (A.config = null !== (w = null == x ? void 0 : x.data) && void 0 !== w ? w : {}, 
                                E = I(), j = E.rights_resource_ab_test, B = E.tag_type, F = A.config.isNewer, i = (0, 
                                u.default)((0, u.default)((0, u.default)({}, A.config.newerBenefitsAdsSetting), null !== (C = null === (S = A.config.benefit) || void 0 === S ? void 0 : S.showTexts) && void 0 !== C ? C : {}), {}, {
                                    isNewer: 1 === F,
                                    otherEntranceCommonSa: {
                                        rights_resource_ab_test: j,
                                        tag_type: B,
                                        is_countdown: U.value ? 1 : 0
                                    },
                                    newerBenefits: N.value ? 1 : 0
                                })), g("setCouponAndEntrance", i), H();

                              case 16:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))).apply(this, arguments);
                }
                function P() {
                    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t = Array.isArray(e) ? e.map(function(e) {
                        return J({
                            type: e.type,
                            subType: e.subType
                        });
                    }).join("-") : "99";
                    return {
                        1: "仅满减券",
                        2: "仅折扣券",
                        3: "仅完单返券",
                        4: "仅完单返现",
                        5: "仅完单返积分",
                        "1-3": "满减券，完单返券",
                        "1-4": "满减券，完单返现",
                        "1-5": "满减券，完单返积分",
                        "2-3": "折扣券，完单返券",
                        "2-4": "折扣券，完单返现",
                        "2-5": "折扣券，完单返积分",
                        99: "无券无任务"
                    }[t];
                }
                function J() {
                    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, t = e.type, n = e.subType, i = "99";
                    if ("coupon" === t) i = n; else if ("userTask" === t) switch (n) {
                      case "COUPON":
                      case "THIRD_COUPON":
                        i = "3";
                        break;

                      case "SCORE":
                      case "ENTERPRISE_SCORE":
                        i = "5";
                        break;

                      case "RED_PACKET":
                        i = "4";
                        break;

                      default:
                        i = "99";
                    }
                    return i;
                }
                function L() {
                    var e, t, n = A.config.aggCode;
                    if ([ 2, 3 ].includes(n)) return {
                        2: "人群未命中",
                        3: "人群命中但无权益"
                    }[n];
                    var i = null !== (e = null === (t = A.config) || void 0 === t ? void 0 : t.hitResult) && void 0 !== e ? e : {}, o = i.ab, r = i.result;
                    return 1 === o ? {
                        0: "对照组",
                        1: "实验组1",
                        2: "实验组2"
                    }[r] || "无" : 2 === o && {
                        0: "对照组",
                        1: "实验组"
                    }[r] || "无";
                }
                function I() {
                    var e = A.config.benefitList, t = void 0 === e ? [] : e;
                    return (0, u.default)((0, u.default)({}, w.value), {}, {
                        rights_type: P(t),
                        tag_type: {
                            rookie: "平台新客",
                            changxian: "业务新客",
                            slience: "休眠用户"
                        }[A.config.benefitType] || "",
                        rights_resource_ab_test: L()
                    });
                }
                function H() {
                    setTimeout(function() {
                        var e = {
                            is_countdown: 0,
                            is_skip: 0
                        };
                        N.value && (e.is_countdown = U.value ? 1 : 0, e.is_skip = S.value ? 1 : 0), (0, 
                        d.statistics)("homepage_rights_resource_expo", (0, u.default)((0, u.default)({}, I()), e));
                    }, 0);
                }
                return Object.assign({
                    data: A,
                    outerStyle: C,
                    getJumpUrl: S,
                    getHeadTxt: E,
                    goRightsPage: j
                }, {
                    getConfig: B
                });
            };
            var b = g;
            t.default = b;
        }).call(this, n("543d").default);
    },
    d422: function(e, t, n) {
        n.r(t);
        var i = n("cc93"), o = n.n(i);
        for (var r in i) [ "default" ].indexOf(r) < 0 && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(r);
        t.default = o.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/home/components/novice-rights/index-create-component", {
    "pages/home/components/novice-rights/index-create-component": function(e, t, n) {
        n("543d").createComponent(n("c5ee"));
    }
}, [ [ "pages/home/components/novice-rights/index-create-component" ] ] ]);